package com.qaml.mes.device.domain.service;

import com.qaml.mes.device.api.CheckUpkeepRecordRecheckService;
import com.qaml.mes.device.dao.CheckUpkeepRecordRecheckDO;
import com.qaml.mes.device.repository.CheckUpkeepRecordRecheckRepository;
import com.qaml.mes.device.domain.convert.CheckUpkeepRecordRecheckConvert;
import com.qaml.mes.device.vo.eqp.CheckUpkeepRecordRecheckVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName CheckUpkeepRecordRecheckServiceImpl
 * @Description 检保记录复核
 * @Author leikai
 * @Date 2024/2/28 0028 17:13
 * @Version 1.0
 */
@Service
public class CheckUpkeepRecordRecheckServiceImpl implements CheckUpkeepRecordRecheckService {

    @Resource
    private CheckUpkeepRecordRecheckRepository checkUpkeepRecordRecheckRepository;

    /**
     * 根据检保记录编号获取检保记录复核信息
     *
     * @param checkUpkeepRecordId
     * @return
     */
    @Override
    public List<CheckUpkeepRecordRecheckVO> getByCheckUpkeepRecordId(String checkUpkeepRecordId) {

        List<CheckUpkeepRecordRecheckDO> checkUpkeepRecordRecheckDOList = checkUpkeepRecordRecheckRepository.getByCheckUpkeepRecordId(checkUpkeepRecordId);

        return CheckUpkeepRecordRecheckConvert.INSTANCE.dos2VOS(checkUpkeepRecordRecheckDOList);
    }
}